from luffyapi.libs.ronglianyun.SmsSDK import SmsSDK
from luffyapi.settings.dev import SMS
import json


def send_message(mobile, datas, tid='1'):
    sdk = SmsSDK(SMS.get('accountSid'), SMS.get('accountToken'), SMS.get('appId'))
    resp = sdk.sendMessage(tid, mobile, datas)
    # print(resp)
    return json.loads(resp)


# send_message(mobile='18831158165', datas=('1234', '2'))

from luffyapi.libs.ronglianyun.SmsSDK import SmsSDK
from luffyapi.settings.dev import SMS
import json


def send_message(mobile, datas, tid='1'):
    sdk = SmsSDK(SMS.get('accountSid'), SMS.get('accountToken'), SMS.get('appId'))
    resp = sdk.sendMessage(tid, mobile, datas)
    # print(resp)
    return json.loads(resp)


# send_message(mobile='18831158165', datas=('1234', '2'))

